package dapps.service.proj;

import java.util.List;

import org.hibernate.criterion.Order;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.orm.hibernate.DefaultEntityManager;

import dapps.entity.proj.Projstates;



//Spring Service Bean的标识.
@Service
//默认将类中的所有函数纳入事务管理.
@Transactional
public class ProjstatesManager extends DefaultEntityManager<Projstates, Long> {

	@Override
	public void delete(Long id) {
		//为演示异常处理及操作员行为日志而抛出的异常.
		entityDao.delete(id);
		
	}
	
	public List<Projstates> getAllTypesOrder(String ordername) {
		return entityDao.getAll(Order.asc(ordername));
	}
}
